using BlogExample.Controllers.Home;
using FubuMVC.Core;
using FubuMVC.UI;

namespace BlogExample.Config
{
	public class BlogExampleFubuRegistry : FubuRegistry
	{
		public BlogExampleFubuRegistry()
		{
			IncludeDiagnostics(true);

			Applies.ToThisAssembly();

			Actions
				.IncludeTypesNamed(x => x.EndsWith("Controller"));

			Routes
				.IgnoreControllerNamespaceEntirely();

			Views
				.TryToAttach(x =>
				             	{
				             		x.by_ViewModel_and_Namespace_and_MethodName();
				             		x.by_ViewModel_and_Namespace();
				             		x.by_ViewModel();
				             	});

			this.UseDefaultHtmlConventions();

			HomeIs<HomeInputModel>();
		}
	}
}